<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                template="./../templates/StakeholderPortalTemplate.xhtml">

    <ui:define name="content">
        <h:form>
            <f:view beforePhase="#{stakeholderEditUnstructuredContentManagedBean.initView}">     
                <p:growl id ="statusMessages" />
                <p:dataTable id="selectedItem" var="UnstructuredContentState" value="#{stakeholderEditUnstructuredContentManagedBean.displayList}">
                    <p:column>  
                        <p:rowToggler />  
                    </p:column>  
                    <p:column headerText="#{bundle['unstructured.edit.header1']}" filterBy="#{UnstructuredContentState.templateName}">  
                        <h:outputText value="#{UnstructuredContentState.templateName}" />  
                    </p:column>  
                    <p:column headerText="Language" filterBy="#{UnstructuredContentState.lang}">  
                        <h:outputText value="#{UnstructuredContentState.lang}" />  
                    </p:column> 
                    <p:column headerText="Template Number" filterBy="#{UnstructuredContentState.templateNo}">  
                        <h:outputText value="#{UnstructuredContentState.templateNo}" />  
                    </p:column> 
                    <p:column>
                        <p:commandButton value="Edit Content" update="statusMessages" actionListener="#{stakeholderEditUnstructuredContentManagedBean.editContent(UnstructuredContentState)}" image="ui-icon ui-icon-pencil" />
                    </p:column>
                    <p:column>
                        <p:commandButton value="Add in another Language" update="statusMessages" actionListener="#{stakeholderEditUnstructuredContentManagedBean.editLanguage(UnstructuredContentState)}" image="ui-icon ui-icon-pencil" />
                    </p:column>
                </p:dataTable>
            </f:view>
        </h:form>
    </ui:define>
</ui:composition>
